package com.netease.pris.activity.view;

import android.text.TextUtils;
import android.view.View;
import android.webkit.URLUtil;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.Toast;
import com.netease.b.a.ab;
import com.netease.pris.activity.ArticleGalleryActivity;
import com.netease.pris.activity.dc;
import com.netease.pris.activity.view.WebViews.WebViewAdapter;
import com.netease.pris.atom.g;
import com.netease.pris.atom.o;
import com.netease.pris.atom.r;
import com.netease.pris.atom.t;
import com.netease.pris.atom.u;
import com.netease.pris.b;
import java.util.LinkedList;
import java.util.List;

class ad extends b
{
  ad(PrisArticleView paramPrisArticleView)
  {
  }

  public void a()
  {
    PrisArticleView.l(this.a).setVisibility(8);
    PrisArticleView.m(this.a).setVisibility(8);
    PrisArticleView.b(this.a, false);
  }

  public void a(int paramInt1, int paramInt2, String paramString)
  {
    if (PrisArticleView.A(this.a).contains(new Integer(paramInt1)))
    {
      PrisArticleView.A(this.a).remove(new Integer(paramInt1));
      if (PrisArticleView.C(this.a) == PrisArticleView.p(this.a))
        dc.a(PrisArticleView.a(this.a), paramInt2);
    }
  }

  public void a(int paramInt, ab paramab)
  {
    if (!PrisArticleView.A(this.a).remove(new Integer(paramInt)));
    while (true)
    {
      return;
      if ((PrisArticleView.c(this.a) != null) && (PrisArticleView.h(this.a) != null) && (paramab.b() != null))
      {
        StringBuilder localStringBuilder = new StringBuilder();
        localStringBuilder.append("javascript:refreshImg('");
        localStringBuilder.append(paramab.a());
        localStringBuilder.append("','");
        localStringBuilder.append(paramab.b());
        localStringBuilder.append("')");
        PrisArticleView.h(this.a).loadUrl(localStringBuilder.toString());
        PrisArticleView.h(this.a).k();
        continue;
      }
    }
  }

  public void a(int paramInt, com.netease.pris.protocol.d paramd)
  {
    if (!PrisArticleView.A(this.a).contains(new Integer(paramInt)));
    while (true)
    {
      return;
      if (paramd != null)
      {
        if (paramd.h.size() > 0)
        {
          if (com.netease.b.a.d.h().i())
            PrisArticleView.N(this.a);
          if (PrisArticleView.A(this.a).contains(new Integer(paramInt)))
          {
            PrisArticleView.A(this.a).remove(new Integer(paramInt));
            Toast.makeText(PrisArticleView.a(this.a), 2131361946, 0).show();
          }
          if ((PrisArticleView.G(this.a) == null) || (PrisArticleView.G(this.a).h == null) || (!((u)PrisArticleView.G(this.a).h.getFirst()).V().equals(((u)paramd.h.getFirst()).V())))
            continue;
          PrisArticleView.d(this.a, true);
          PrisArticleView.H(this.a).setVisibility(0);
          this.a.c(PrisArticleView.p(this.a), ArticleGalleryActivity.i, Boolean.valueOf(true));
          continue;
        }
        if ((paramd.i.size() <= 0) || (!PrisArticleView.A(this.a).contains(new Integer(paramInt))))
          continue;
        PrisArticleView.A(this.a).remove(new Integer(paramInt));
        Toast.makeText(PrisArticleView.a(this.a), ((r)paramd.i.getFirst()).e(), 0).show();
        continue;
      }
    }
  }

  public void a(int paramInt, String paramString, boolean paramBoolean)
  {
    if (PrisArticleView.O(this.a) != paramInt);
    while (true)
    {
      return;
      if ((!paramBoolean) && (paramString != null))
        PrisArticleView.b(this.a, paramString);
      PrisArticleView.g(this.a, 1);
    }
  }

  public void c(int paramInt)
  {
    if (!PrisArticleView.A(this.a).remove(new Integer(paramInt)));
    while (true)
    {
      return;
      if (PrisArticleView.c(this.a) != null)
      {
        List localList = PrisArticleView.c(this.a).c();
        if ((localList != null) && (localList.size() != 0))
          continue;
        PrisArticleView.a(this.a, true);
        continue;
      }
    }
  }

  public void d(int paramInt1, int paramInt2, String paramString, boolean paramBoolean)
  {
    if (PrisArticleView.A(this.a).contains(new Integer(paramInt1)))
    {
      if (PrisArticleView.C(this.a) == PrisArticleView.p(this.a))
        dc.a(PrisArticleView.a(this.a), paramInt2);
      PrisArticleView.A(this.a).remove(new Integer(paramInt1));
      if (PrisArticleView.k(this.a))
      {
        PrisArticleView.l(this.a).setVisibility(8);
        PrisArticleView.m(this.a).setVisibility(8);
      }
      PrisArticleView.e(this.a, false);
      if (paramBoolean)
      {
        PrisArticleView.w(this.a).removeFooterView(PrisArticleView.J(this.a));
        PrisArticleView.b(this.a, false);
      }
    }
  }

  public void d(int paramInt, com.netease.pris.protocol.d paramd, boolean paramBoolean)
  {
    if (paramd == null);
    while (true)
    {
      return;
      if (PrisArticleView.A(this.a).contains(new Integer(paramInt)))
      {
        PrisArticleView.A(this.a).remove(new Integer(paramInt));
        if (PrisArticleView.k(this.a))
        {
          PrisArticleView.l(this.a).setVisibility(8);
          PrisArticleView.m(this.a).setVisibility(8);
        }
        PrisArticleView.e(this.a, false);
        PrisArticleView.w(this.a).removeFooterView(PrisArticleView.J(this.a));
        PrisArticleView.b(this.a, false);
        PrisArticleView.a(this.a, paramd, paramBoolean);
        if (1 != PrisArticleView.K(this.a))
          PrisArticleView.f(this.a, 1);
        String str1 = PrisArticleView.L(this.a);
        PrisArticleView.a(this.a, null);
        if (paramd.g == null)
          continue;
        String str2 = paramd.g.b(g.i);
        if (TextUtils.isEmpty(str2))
          continue;
        if (str2.equals(str1))
        {
          PrisArticleView.a(this.a, null);
          continue;
        }
        PrisArticleView.a(this.a, str2);
        continue;
      }
    }
  }

  public void i(int paramInt1, int paramInt2, String paramString)
  {
    if (PrisArticleView.A(this.a).contains(new Integer(paramInt1)))
    {
      PrisArticleView.A(this.a).remove(new Integer(paramInt1));
      if (PrisArticleView.C(this.a) == PrisArticleView.p(this.a))
        dc.a(PrisArticleView.a(this.a), paramInt2);
    }
  }

  public void k(int paramInt, com.netease.pris.protocol.d paramd)
  {
    if (!PrisArticleView.A(this.a).contains(new Integer(paramInt)));
    while (true)
    {
      return;
      PrisArticleView.A(this.a).remove(new Integer(paramInt));
      if (paramd == null)
        continue;
      if (paramd.j.size() > 0)
      {
        Toast.makeText(PrisArticleView.a(this.a), 2131361947, 0).show();
        PrisArticleView.d(this.a, false);
        PrisArticleView.H(this.a).setVisibility(4);
        this.a.c(PrisArticleView.p(this.a), ArticleGalleryActivity.j, Boolean.valueOf(false));
        if ((PrisArticleView.G(this.a) == null) || (PrisArticleView.G(this.a).h == null) || (!((u)PrisArticleView.G(this.a).h.getFirst()).V().equals(((o)paramd.j.getFirst()).a())))
          continue;
        PrisArticleView.d(this.a, false);
        PrisArticleView.H(this.a).setVisibility(4);
        continue;
      }
      if ((paramd.i.size() <= 0) || (!PrisArticleView.A(this.a).contains(new Integer(paramInt))))
        continue;
      PrisArticleView.A(this.a).remove(new Integer(paramInt));
      Toast.makeText(PrisArticleView.a(this.a), ((r)paramd.i.getFirst()).e(), 0).show();
    }
  }

  public void l(int paramInt1, int paramInt2, String paramString)
  {
    if (!PrisArticleView.A(this.a).contains(new Integer(paramInt1)));
    while (true)
    {
      return;
      PrisArticleView.A(this.a).remove(new Integer(paramInt1));
      PrisArticleView.c(this.a, 0);
      PrisArticleView.a(this.a, false);
      if (PrisArticleView.k(this.a))
      {
        PrisArticleView.l(this.a).setVisibility(8);
        PrisArticleView.m(this.a).setVisibility(8);
      }
      if ((PrisArticleView.C(this.a) == PrisArticleView.p(this.a)) && (PrisArticleView.c(this.a) == null))
        dc.a(PrisArticleView.a(this.a), paramInt2);
      if (PrisArticleView.c(this.a) != null)
        continue;
      PrisArticleView.h(this.a).loadDataWithBaseURL(null, PrisArticleView.F(this.a), "text/html", "UTF-8", null);
    }
  }

  public void l(int paramInt, com.netease.pris.protocol.d paramd)
  {
    Integer localInteger = new Integer(paramInt);
    if (paramd == null)
    {
      if (PrisArticleView.A(this.a).contains(localInteger))
        PrisArticleView.A(this.a).remove(localInteger);
      return;
    }
    PrisArticleView localPrisArticleView;
    if (PrisArticleView.A(this.a).contains(localInteger))
    {
      localPrisArticleView = this.a;
      if ((!PrisArticleView.B(this.a)) && (PrisArticleView.C(this.a) != PrisArticleView.p(this.a)))
        break label200;
    }
    label200: for (boolean bool = true; ; bool = false)
    {
      PrisArticleView.a(localPrisArticleView, paramd, bool, true);
      if (paramd.h.size() > 0)
      {
        u localu = (u)paramd.h.getFirst();
        String str = localu.b(g.D);
        if (str != null)
          PrisArticleView.a(this.a, 902, null, str, localu.V());
      }
      if ((PrisArticleView.C(this.a) != PrisArticleView.p(this.a)) || (PrisArticleView.D(this.a)))
        break;
      PrisArticleView.c(this.a, true);
      PrisArticleView.E(this.a);
      break;
    }
  }

  public void m(int paramInt, com.netease.pris.protocol.d paramd)
  {
    if (!PrisArticleView.A(this.a).remove(new Integer(paramInt)));
    u localu;
    while (true)
    {
      return;
      if (paramd == null)
        break;
      com.netease.pris.protocol.d locald = PrisArticleView.G(this.a);
      PrisArticleView.a(this.a, paramd);
      if (locald != null)
        locald.k();
      if (PrisArticleView.G(this.a).h == null)
        continue;
      localu = (u)PrisArticleView.G(this.a).h.getFirst();
      if (localu == null)
        continue;
      if (t.a != localu.at())
        break label195;
      PrisArticleView.d(this.a, true);
      PrisArticleView.H(this.a).setVisibility(0);
      this.a.c(PrisArticleView.p(this.a), ArticleGalleryActivity.i, Boolean.valueOf(true));
    }
    while (true)
    {
      PrisArticleView.d(this.a, localu.ab());
      this.a.c(PrisArticleView.p(this.a), ArticleGalleryActivity.q, Integer.valueOf(PrisArticleView.I(this.a)));
      PrisArticleView.e(this.a, localu.aa());
      break;
      break;
      label195: PrisArticleView.d(this.a, false);
      PrisArticleView.H(this.a).setVisibility(8);
      this.a.c(PrisArticleView.p(this.a), ArticleGalleryActivity.j, Boolean.valueOf(false));
    }
  }

  public void n(int paramInt1, int paramInt2, String paramString)
  {
    if (!PrisArticleView.A(this.a).remove(new Integer(paramInt1)));
    while (true)
    {
      return;
      if (PrisArticleView.k(this.a))
      {
        PrisArticleView.l(this.a).setVisibility(8);
        PrisArticleView.m(this.a).setVisibility(8);
        continue;
      }
    }
  }

  public void n(int paramInt, com.netease.pris.protocol.d paramd)
  {
    if (paramd == null);
    while (true)
    {
      return;
      boolean bool;
      do
      {
        do
          try
          {
            if (!PrisArticleView.A(this.a).contains(new Integer(paramInt)))
              continue;
            PrisArticleView.A(this.a).remove(new Integer(paramInt));
            Toast.makeText(PrisArticleView.a(this.a), 2131361945, 0).show();
            if ((PrisArticleView.c(this.a) == null) || (1 == PrisArticleView.M(this.a)))
            {
              PrisArticleView.a(this.a, null);
              PrisArticleView.b(this.a, PrisArticleView.c(this.a));
            }
            u localu = (u)PrisArticleView.c(this.a).h.getFirst();
            if (localu == null)
              break;
            String str = localu.b(g.D);
            if (str == null)
              break;
            if (!URLUtil.isNetworkUrl(str))
              str = "http://easyread.163.com" + str;
            PrisArticleView.a(this.a, 902, null, str, localu.V());
            break;
          }
          catch (NullPointerException localNullPointerException)
          {
            localNullPointerException.printStackTrace();
            break;
          }
          finally
          {
          }
        while (PrisArticleView.c(this.a) == null);
        bool = paramd.a().equals(((u)PrisArticleView.c(this.a).h.getFirst()).V());
      }
      while (bool);
    }
  }

  public void o(int paramInt, com.netease.pris.protocol.d paramd)
  {
    try
    {
      if (PrisArticleView.A(this.a).contains(new Integer(paramInt)))
      {
        PrisArticleView.A(this.a).remove(new Integer(paramInt));
        Toast.makeText(PrisArticleView.a(this.a), 2131361952, 0).show();
        if (PrisArticleView.c(this.a) != null)
        {
          if (1 == PrisArticleView.M(this.a))
          {
            PrisArticleView.a(this.a, null);
            PrisArticleView.b(this.a, PrisArticleView.c(this.a));
          }
          u localu = (u)PrisArticleView.c(this.a).h.getFirst();
          if (localu != null)
          {
            String str = localu.b(g.D);
            if (str != null)
              PrisArticleView.a(this.a, 902, null, str, null);
          }
        }
      }
    }
    catch (NullPointerException localNullPointerException)
    {
      localNullPointerException.printStackTrace();
    }
    finally
    {
    }
  }

  public void p(int paramInt1, int paramInt2, String paramString)
  {
    try
    {
      if (PrisArticleView.A(this.a).contains(new Integer(paramInt1)))
      {
        PrisArticleView.A(this.a).remove(new Integer(paramInt1));
        if (PrisArticleView.C(this.a) == PrisArticleView.p(this.a))
          dc.a(PrisArticleView.a(this.a), paramInt2);
      }
      return;
    }
    catch (NullPointerException localNullPointerException)
    {
      while (true)
        localNullPointerException.printStackTrace();
    }
    finally
    {
    }
    throw localObject;
  }

  public void q(int paramInt1, int paramInt2, String paramString)
  {
    try
    {
      if (PrisArticleView.A(this.a).contains(new Integer(paramInt1)))
      {
        PrisArticleView.A(this.a).remove(new Integer(paramInt1));
        if (PrisArticleView.C(this.a) == PrisArticleView.p(this.a))
          dc.a(PrisArticleView.a(this.a), paramInt2);
      }
      return;
    }
    catch (NullPointerException localNullPointerException)
    {
      while (true)
        localNullPointerException.printStackTrace();
    }
    finally
    {
    }
    throw localObject;
  }

  public void q(int paramInt, com.netease.pris.protocol.d paramd)
  {
    if (!PrisArticleView.A(this.a).contains(new Integer(paramInt)));
    while (true)
    {
      return;
      PrisArticleView.A(this.a).remove(new Integer(paramInt));
      if ((paramd == null) || (paramd.h.size() == 0))
        continue;
      Toast.makeText(PrisArticleView.a(this.a), 2131361948, 0).show();
    }
  }

  public void t(int paramInt1, int paramInt2, String paramString)
  {
    if (PrisArticleView.A(this.a).contains(new Integer(paramInt1)))
    {
      PrisArticleView.A(this.a).remove(new Integer(paramInt1));
      dc.a(PrisArticleView.a(this.a), paramInt2);
    }
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.pris.activity.view.ad
 * JD-Core Version:    0.6.0
 */